feat(pluginpresets): remove admission check on PluginDefinition existence#1954
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes PluginPresets “CI-friendly” by removing the admission-time requirement that the referenced (Cluster-)PluginDefinition already exists, and instead surfaces missing definitions via PluginPreset status during reconciliation.
Changes:
- Updated PluginPreset validating webhook to stop fetching/validating referenced (Cluster-)PluginDefinition on create.
- Added controller logic + test to reflect missing PluginDefinition via
PluginFailedcondition (reasonPluginDefinitionNotFound) and propagate message into Ready condition. - Updated docs to describe the new behavior and removed outdated “immutable” wording for Plugin’s
pluginDefinitionRef.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/webhook/v1alpha1/pluginpreset_webhook.go | Removes admission-time (Cluster-)PluginDefinition existence/option validation for PluginPreset create. |
| internal/webhook/v1alpha1/pluginpreset_webhook_test.go | Adjusts admission tests to expect PluginPreset creation to succeed even when definitions are missing. |
| internal/controller/plugin/pluginpreset_controller.go | Attempts to detect missing PluginDefinition during plugin reconciliation and set PluginFailed/Ready messaging accordingly. |
| internal/controller/plugin/pluginpreset_controller_test.go | Adds coverage asserting PluginPreset status reflects a missing (Cluster-)PluginDefinition. |
| api/v1alpha1/pluginpreset_types.go | Introduces PluginDefinitionNotFound condition reason constant. |
| docs/user-guides/plugin/plugin-management.md | Documents new “admit first, reflect missing definition in status” behavior. |
| docs/reference/components/pluginpreset.md | Adds note that PluginPreset may reference a not-yet-created PluginDefinition. |
| docs/reference/components/plugin.md | Removes “immutable” wording for spec.pluginDefinitionRef. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2ce660c to
b763833
Compare
24 tasks
b763833 to
136ef01
Compare
3624ab9 to
4b61a89
Compare
abhijith-darshan
approved these changes
May 8, 2026
…ence In order to make PluginPresets more CI-friendly. The admission check for (Cluster-)PluginDefinition existence has been removed. If the PluginPreset references a non-existing (Cluster-)PluginDefinition this will be reflected in the Status on the next reconciliation. Co-authored-by: Copilot <[email protected]> Signed-off-by: Ivo Gosemann <[email protected]>
Signed-off-by: Ivo Gosemann <[email protected]>
3f98c52 to
f96b778
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In order to make PluginPresets more CI-friendly. The admission check for (Cluster-)PluginDefinition existence has been removed.
If the PluginPreset references a non-existing (Cluster-)PluginDefinition this will be reflected in the Status on the next reconciliation.
Co-authored-by: Copilot [email protected]
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Added to documentation?
Checklist